<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the Closure to execute when that URI is requested.
|
*/
Route::resource('ganado','GanadoController');
Route::get('ganadoactivo','GanadoController@activos');
Route::get('ganadoinactivo','GanadoController@inactivos');
Route::get('ganadovendido','GanadoController@vendidos');
Route::get('ganadolesionado','GanadoController@lesionados');
Route::get('ganadomuerto','GanadoController@muertos');

Route::resource('reportes','ReportesController');
Route::resource('reporteganado','ReportesController@ganado');
Route::get('ganancias','ReportesController@showganancias');
Route::post('ganancias', 'ReportesController@ganancias');

Route::resource('ventas','VentasController');
Route::post('vendiendo', 'VentasController@vendiendo');



Route::resource('clienteproveedor', 'ClienteProveedoresController');



Route::get('/', function()
{
	return View::make('index');
});
//Rutas GanadoInsumo
Route::resource('insumos/{id}/aplicar','GanadoInsumoController@aplicar');
Route::get('insumos/{id}/store','GanadoInsumoController@store');
Route::get('insumos/{id}/aplicados','GanadoInsumoController@ver');


Route::resource('ganado','GanadoController');

Route::resource('potreros','PotreroController');

Route::resource('compras','CompraController');
//Rutas Insumos
Route::resource('insumos','InsumosController');
Route::get('insumos/create', 'InsumosController@create');
Route::get('insumos/{id}/edit', 'InsumosController@edit');
Route::get('insumos/destroy/{id}', 'InsumosController@destroy');

//Insumos-Inventario
Route::resource('inventario','InventarioInsumoController');
Route::post('inventario/create','InventarioInsumoController@create');
Route::post('inventario/store','InventarioInsumoController@store'); 
Route::post('inventario/edit/{id}','InventarioInsumoController@edit');  
//Rutas razas


Route::resource('razas','RazaController');
//Rutas razas-fin

//Rutas Tipos_insumos

Route::resource('tipos_insumos','TiposInsumosController');

Route::resource('ganadogrupo','GroupController');
Route::get('/ganadogrupo/{id}/grupos', 'GroupController@grupos');
Route::post('/ganadogrupo/store', 'GroupController@store');
Route::get('/ganadogrupo/{id}/ganados', 'GroupController@ganados');

Route::resource('grupos','GruposController');

//Rutas Ganado-Potrero
Route::resource('ganadopotrero','PotreroGController');
Route::get('/ganadopotrero/{id}/potreros', 'PotreroGController@potreros');
Route::post('/ganadopotrero/store', 'PotreroGController@store');
Route::get('/ganadopotrero/{id}/ganados', 'PotreroGController@ganados');